package com.badibadi.activity;

import java.util.HashMap;
import java.util.Map;

import com.badibadi.infos.Results;
import com.badibadi.mytools.Constants;
import com.badibadi.mytools.Convert;
import com.badibadi.mytools.Utils;
import com.badibadi.uniclubber.R;
import com.badibadi.uniclubber.R.id;
import com.badibadi.uniclubber.R.string;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

/**
 * 验证邮箱
 */
public class ValidationEmailActivity extends ForgotPassWord2Activity {

	private String Key="RegirstrationActivity";
	private String Email;
//	forgot_password2_return_btn
	Button forgot_password2_return_btn;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		init();
	}

	private void init() {
		// TODO Auto-generated method stub
		if(getIntent().getStringExtra(Key)!=null)
	    {
			Email=getIntent().getStringExtra(Key);
			
			
		}
		//回退
		forgot_password2_return_btn=(Button)this.findViewById(R.id.forgot_password2_return_btn);
		forgot_password2_return_btn.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				ValidationEmailActivity.this.finish();
			}
		});
		
		
		((TextView)(this.findViewById(R.id.forgot_passward2_title))).setText(getResources().getString(R.string.ValidationEmail));
		
		 this.findViewById(R.id.jump_to_the_mail).setOnClickListener(new View.OnClickListener() {
				
				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					Intent intent=new Intent(ValidationEmailActivity.this,ValidationEmailWebViewActivity.class);
					startActivity(intent);
				}
			});
		TextView ForgotPassWardTiShi=(TextView)this.findViewById(R.id.ForgotPassWardTiShi);
		
		String str=String.format(getResources().getString(R.string.ValidationEmailTiShi), Email);
		
		
		ForgotPassWardTiShi.setText(str);
		
		TextView tv_em=(TextView)this.findViewById(R.id.EmailAwaySend);
		tv_em.setText(getResources().getString(R.string.EmailAwaySend));
		this.findViewById(R.id.emailawaysendGroup).setVisibility(View.VISIBLE);
//		new Thread(new Runnable() {
//			
//			@Override
//			public void run() {
//				// TODO Auto-generated method stub
//				Map<String, Object> map=new HashMap<String, Object>();
//				String content=Utils.sendRequest(map, Constants.BadiUrl);
//				   
//				Results results = Utils.checkResult_NNN(
//						getApplicationContext(), content);
//				
//			}
//		}).start();

	}
	
}
